<?php

namespace App\Models\MainDB;

use Illuminate\Database\Eloquent\Model;

class Badge extends Model{

    protected $table = 'ln_badge';     //数据库内完整表名

    protected $primaryKey = 'id';    //主键名

    protected $fillable = [
        "id",
        "picture",
        "name",
        "sort",
        "type_id",
        "add_time",
        "status",
    ];

    public $timestamps = false;

    public function badge_type() {
        return $this->hasOne("App\Models\MainDB\BadgeType", "id", "type_id");
    }

}